home *** CD-ROM | disk | FTP | other *** search
/ Programmers Heaven 2 / Programmers Heaven 2.iso / files / windows / ocx / midipk.exe / MIDISET.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-06-23  |  3.6 KB  |  126 lines

  1. VERSION 4.00
  2. Begin VB.Form MIDISetupForm 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "MIDI Setup"
  5.    ClientHeight    =   1200
  6.    ClientLeft      =   1575
  7.    ClientTop       =   4350
  8.    ClientWidth     =   6315
  9.    ControlBox      =   0   'False
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   0
  13.       weight          =   700
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   1605
  21.    Left            =   1515
  22.    LinkTopic       =   "Form1"
  23.    LockControls    =   -1  'True
  24.    MaxButton       =   0   'False
  25.    ScaleHeight     =   1200
  26.    ScaleWidth      =   6315
  27.    Top             =   4005
  28.    Width           =   6435
  29.    Begin VB.CommandButton CmdCancel 
  30.       Appearance      =   0  'Flat
  31.       BackColor       =   &H80000005&
  32.       Caption         =   "Cancel"
  33.       Height          =   375
  34.       Left            =   5010
  35.       TabIndex        =   5
  36.       Top             =   690
  37.       Width           =   1005
  38.    End
  39.    Begin VB.CommandButton CmdOk 
  40.       Appearance      =   0  'Flat
  41.       BackColor       =   &H80000005&
  42.       Caption         =   "Ok"
  43.       Height          =   375
  44.       Left            =   5010
  45.       TabIndex        =   4
  46.       Top             =   240
  47.       Width           =   1005
  48.    End
  49.    Begin VB.ComboBox ComboMidiOut 
  50.       Appearance      =   0  'Flat
  51.       Height          =   300
  52.       Left            =   2460
  53.       Style           =   2  'Dropdown List
  54.       TabIndex        =   1
  55.       Top             =   540
  56.       Width           =   2265
  57.    End
  58.    Begin VB.ComboBox ComboMidiIn 
  59.       Appearance      =   0  'Flat
  60.       Height          =   300
  61.       Left            =   120
  62.       Style           =   2  'Dropdown List
  63.       TabIndex        =   0
  64.       Top             =   540
  65.       Width           =   2265
  66.    End
  67.    Begin VB.Label Label2 
  68.       Caption         =   "MIDI Out Device"
  69.       Height          =   255
  70.       Left            =   2490
  71.       TabIndex        =   3
  72.       Top             =   240
  73.       Width           =   2025
  74.    End
  75.    Begin VB.Label Label1 
  76.       Caption         =   "MIDI In Device"
  77.       Height          =   255
  78.       Left            =   150
  79.       TabIndex        =   2
  80.       Top             =   240
  81.       Width           =   2115
  82.    End
  83. Attribute VB_Name = "MIDISetupForm"
  84. Attribute VB_Creatable = False
  85. Attribute VB_Exposed = False
  86. Option Explicit
  87. Private Sub CmdCancel_Click()
  88.     Unload MIDISetupForm
  89. End Sub
  90. Private Sub CmdOk_Click()
  91.     MIDIInOpen
  92.     MIDIOutOpen
  93.     MIDISetupForm.Hide
  94. End Sub
  95. Private Sub Form_Load()
  96.     Dim I As Integer
  97.     ' Center the form on the screen
  98.     Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  99.     '
  100.     ' Fill output device combo box
  101.     '
  102.     For I = -1 To frmMain.MIDIOutput1.DeviceCount - 1
  103.         frmMain.MIDIOutput1.DeviceID = I
  104.         ComboMidiOut.AddItem frmMain.MIDIOutput1.ProductName
  105.     Next
  106.     '
  107.     ' Select first in list
  108.     '
  109.     ComboMidiOut.ListIndex = 0
  110.     frmMain.MIDIOutput1.DeviceID = -1
  111.     MIDIOutOpen
  112.     '
  113.     ' Fill input device combo box
  114.     '
  115.     For I = 0 To frmMain.MIDIInput1.DeviceCount - 1
  116.         frmMain.MIDIInput1.DeviceID = I
  117.         ComboMidiIn.AddItem frmMain.MIDIInput1.ProductName
  118.     Next
  119.     '
  120.     ' Select first in list
  121.     '
  122.     ComboMidiIn.ListIndex = 0
  123.     frmMain.MIDIInput1.DeviceID = 0
  124.     MIDIInOpen
  125. End Sub
  126.